#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, m, d[10001], c[10001], tot;
vector<ll> edge[10001];
priority_queue<ll> q;
inline void Toposort() {
	for (ll i = 1; i <= n; ++i)
		if (!d[i])
			q.push(-i);
	while (!q.empty()) {
		ll x = -q.top();
		q.pop();
		c[++tot] = x;
		for (auto y : edge[x])
			if (--d[y] == 0)
				q.push(-y);
	}
	for (ll i = 1; i <= tot; ++i)
		printf("%lld ", c[i]);
}

int main() {
	scanf("%lld%lld", &n, &m);
	for (ll i = 1; i <= m; ++i) {
		ll x, y;
		scanf("%lld%lld", &x, &y);
		edge[x].push_back(y);
		++d[y];
	}
	Toposort();
	return 0;
}
